<template>
  <div id="app" class="TemperatureTable">
    <a-modal
      title="体温异常人"
      :visible="visible"
      :width="width"
      rowKey="id"
      @cancel="handleCancel"
    >
      <a-table :loading="loading" :columns="columns" :data-source="dataSource">
        <span slot="temperature" slot-scope="text, record">
          <span style="color:#f00">{{ text }}</span>
        </span>
        <!-- <span slot="action" slot-scope="text, record">
          <a >确认</a>
        </span> -->
      </a-table>
      <template slot="footer">
       <div></div>
      </template>
    </a-modal>
  </div>
</template>
<script>
import { getAction } from "@/api/manage.js";
export default {
  name: 'TemperatureTable',
  data() {
    return {
      url: '/health/skTemperatureRecord/getTodayStudentAbnormalTemperature',
      width:800,
      visible: false,
      loading: false,
      disableSubmit: false,
      dataSource:[],
      columns:[
        {
          title: '班级',
          align: 'center',
          dataIndex: 'className'
        },
        {
          title: '姓名',
          align: 'center',
          dataIndex: 'studentName'
        },
        {
          title: '测量时间',
          align: 'center',
          dataIndex: 'examinationTime'
        },
        {
          title: '温度',
          align: 'center',
          dataIndex: 'temperature',
          scopedSlots: { customRender: 'temperature' }
        },
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   align: 'center',
        //   fixed: 'right',
        //   width: 147,
        //   scopedSlots: { customRender: 'action' }
        // }
      ]
    }
  },
  components: {},

  filters: {},

  computed: {},

  created() {},

  activated() {},

  mounted() {},

  methods: {
    init(){
      this.visible = true;
      this.loading = true;
      getAction(this.url).then(res => {
        this.loading = false;
        if(res.success) {
          this.dataSource = res.result
        } else {
          this.$message.warning(res.message);
        }
      })
    },
    handleCancel () {
      this.visible = false;
    }
  }
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
